package com.ruoyi.infoSiteService.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.infoIntroduce.domain.InfoIntroduce;
import com.ruoyi.infoIntroduce.service.IInfoIntroduceService;
import com.ruoyi.infoIntroduce.service.impl.InfoIntroduceServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/*
* 导师相关网页接口
* */
@RestController
@RequestMapping("/site/introduce")
public class InfoSiteIntroduceController {

    /*
    * 导师主表
    * */
    @Autowired
    private IInfoIntroduceService introduceService;


    //查网页首页导师展示
    @GetMapping("/hot")
    public AjaxResult selectHotTeacher(){
        InfoIntroduce infoIntroduce = new InfoIntroduce();
        infoIntroduce.setIntroduceStatus(1);
        List<InfoIntroduce> infoIntroduces = introduceService.selectInfoIntroduceList(infoIntroduce);
        return AjaxResult.success(infoIntroduces);
    }

    /*
    *查所有导师
    * */
    @GetMapping("/all")
    public AjaxResult selectAllTeacher(){
        List<InfoIntroduce> infoIntroduces = introduceService.selectInfoIntroduceList(new InfoIntroduce());
        return AjaxResult.success(infoIntroduces);
    }

}
